package com.qf.service.impl;

import com.qf.dao.TbManagersMapper;
import com.qf.entitys.TbManagers;
import com.qf.service.TbManagersService;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;

import javax.annotation.Resource;

@Service
public class TbManagersServiceImpl implements TbManagersService {

    @Resource
    private TbManagersMapper managersMapper;
    @Override
    public int deleteByPrimaryKey(String mgrId) {
        return 0;
    }

    @Override
    public int insert(TbManagers record) {
        return 0;
    }

    @Override
    public int insertSelective(TbManagers record) {
        return 0;
    }

    @Override
    public TbManagers selectByPrimaryKey(String mgrId) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(TbManagers record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(TbManagers record) {
        return 0;
    }

    @Override
    public TbManagers login(String loginName, String loginPwd) {
        loginPwd= DigestUtils.md5DigestAsHex(loginPwd.getBytes());
        TbManagers login = managersMapper.login(loginName, loginPwd);
        return login;
    }
}
